#include "agx.h"

AGX::AGX() {
    _agxModel = "AGX Xavier";
    _aiPerformance = "32 TOPS";
    _cudaCores = 512;
    _tensorCores = 64;
    _gpuMemorySize = 32;
    _memorySize = 32;
}

void AGX::print() {
    cout << "AGX:" << endl;
    cout << "\tagxModel: " << _agxModel << endl;
    cout << "\taiPerformance: " << _aiPerformance << endl;
    cout << "\tcudaCores: " << _cudaCores << endl;
    cout << "\ttensorCores: " << _tensorCores << endl;
}

int AGX::save(YAML::Node& node) {
    node["AGX"] = YAML::Node(YAML::NodeType::Map);
    node["AGX"]["agxModel"] = _agxModel;
    node["AGX"]["aiPerformance"] = _aiPerformance;
    node["AGX"]["cudaCores"] = _cudaCores;
    node["AGX"]["tensorCores"] = _tensorCores;
    node["AGX"]["gpuMemorySize"] = _gpuMemorySize;
    node["AGX"]["memorySize"] = _memorySize;
    return 0;
}

int AGX::setAgxModel(std::string model) {
    _agxModel = model;
    return 0;
}

void AGX::setAiPerformance(const std::string& performance) {
    _aiPerformance = performance;
}
void AGX::setCudaCores(int cores) {
    _cudaCores = cores;
}
void AGX::setTensorCores(int cores) {
    _tensorCores = cores;
}
void AGX::setGpuMemorySize(int size) {
    _gpuMemorySize = size;
}
void AGX::setMemorySize(int size) {
    _memorySize = size;
}
